import { http } from "../http";

type ListResult = {
  code: number;
  message: string;
  list: Array<any>;
};

export function getRecordList (data?: object): Promise<ListResult> {
  return http.request({
    url: "https://www.xiaoyidream.com/api/v1/complaint/record/list",
    method: "post",
    data,
  });
}

export function processFinish (params?: object): Promise<ListResult> {
  return http.request({
    url: "https://www.xiaoyidream.com/api/v1/complaint/process/finish",
    method: "get",
    params,
  });
}


export function getWechatUser(params?: object): Promise<ListResult> {
  return http.request({
    url: "https://www.xiaoyidream.com/api/v1/wechat/user",
    method: "get",
    params
  });
}

export function getComplaintTree(params?: object): Promise<ListResult> {
  return http.request({
    url: "https://www.xiaoyidream.com/api/v1/complaint/reason/tree",
    method: "get",
    params
  });
}